import request from '@/utils/request';

// 添加课程达成度接口
export function addCourseReach(data) {
    return request({
        url: '/tes/conclude/conclude/add',
        method: 'post',
        data
    })
}

// 课程达成度list接口
export function courseReachList(params) {
    return request({
        url: '/tes/conclude/conclude/list',
        method: 'get',
        params
    })
}

// 拷贝课程达成度
export function copyCourseReach(data) {
    return request({
        url: '/tes/conclude/conclude/copy',
        method: 'post',
        data
    })
}

// 拷贝课程达成度
export function delCourseReach(data) {
    return request({
        url: '/tes/conclude/conclude/delete',
        method: 'delete',
        data
    })
}

// 课程达成度详情
export function courseDetails(params) {
    return request({
        url: '/tes/conclude/conclude/details',
        method: 'get',
        params
    })
}

// 学生list
export function studentList(params) {
    return request({
        url: '/tes/conclude/student/list',
        method: 'get',
        params
    })
}

// 学生修改
export function studentEdit(data) {
    return request({
        url: '/tes/conclude/student/update',
        method: 'put',
        data
    })
}

// 学生删除
export function studentDel(data) {
    return request({
        url: '/tes/conclude/student/delete/batch',
        method: 'delete',
        data
    })
}



//下载ExcelDemo
export function downLoadStudentExcel(params) {
    return request({
        url: '/tes/excel/template/teadown',
        method: 'get',
        responseType: 'blob',
        params
    })
}

// 搜索班级列表
export function searchClassList(params) {
    return request({
        url: '/tes/conclude/student/class/list',
        method: 'get',
        params
    })
}

//课程目标开关
export function publishSwitch(data) {
    return request({
        url: '/tes/conclude/conclude/ispublic',
        method: 'post',
        data
    })
}

// 课程达成度列表
export function reachList(params) {
    return request({
        url: '/tes/conclude/course/list',
        method: 'get',
        params
    })
}

//课程达成度添加
export function addReachTarget(data) {
    return request({
        url: '/tes/conclude/course/add',
        method: 'post',
        data
    })
}

//达成度修改
export function editReach(data) {
    return request({
        url: '/tes/conclude/conclude/update',
        method: 'post',
        data
    })
}

//添加考核项
export function addCheck(data) {
    return request({
        url: '/tes/conclude/check/add',
        method: 'post',
        data
    })
}

//考核分项更新
export function updateCheck(data) {
    return request({
        url: '/tes/conclude/check/update',
        method: 'post',
        data
    })
}

//考核项列表
export function checkList(params) {
    return request({
        url: '/tes/conclude/check/list',
        method: 'get',
        params
    })
}

// 考核分项详情
export function checkDetail(params) {
    return request({
        url: '/tes/conclude/check/detail',
        method: 'get',
        params
    })
}

// 删除考核分项
export function delCheck(data) {
    return request({
        url: '/tes/conclude/check/delete',
        method: 'delete',
        data
    })
}

// 设置考核权重
export function setWeight(data) {
    return request({
        url: '/tes/conclude/check/setweight',
        method: 'post',
        data
    })
}

// 批量导入成绩模板下载
export function downLoadAllData(params) {
    return request({
        url: '/tes/conclude/score/downTemplateEntirety',
        method: 'get',
        responseType: 'blob',
        params
    })
}

// 分项导入成绩模板下载
export function downLoadData(params) {
    return request({
        url: '/tes/conclude/score/downTemplateSub',
        method: 'get',
        responseType: 'blob',
        params
    })
}

//上传文件
export function uploadStudentExcel(data) {
    return request({
        url: '/tes/conclude/student/excel/import',
        method: 'post',
        headers: {
            'Content-Type': "multipart/form-data"
        },
        data
    })
}

//整体导入成绩
export function importAllScore(data) {
    return request({
        url: '/tes/conclude/score/updateScoreEntirety',
        method: 'post',
        headers: {
            'Content-Type': "multipart/form-data"
        },
        data
    })
}

//整体数据下载
export function downLoadAllScoreData(params) {
    return request({
        url: '/tes/conclude/score/entirety/download',
        method: 'get',
        responseType: 'blob',
        params
    })
}

//部分导入成绩
export function importScore(data) {
    return request({
        url: '/tes/conclude/score/updateScoreSub',
        method: 'post',
        headers: {
            'Content-Type': "multipart/form-data"
        },
        data
    })
}

//达成度统计
export function reachTableList(params) {
    return request({
        url: '/tes/conclude/score/statistics',
        method: 'get',
        params
    })
}

//达成度期望
export function analysisExpect(params) {
    return request({
        url: '/tes/conclude/statistics/course',
        method: 'get',
        params
    })
}

//获取课程目标权重
export function getCourseTargetWeight(params) {
    return request({
        url: '/tes/conclude/course/getCourseWeight',
        method: 'get',
        params
    })
}

//设置课程目标关联权重
export function setCourseTargetWeight(data) {
    return request({
        url: '/tes/conclude/course/settingWeight',
        method: 'post',
        data
    })
}

//关联系统信息
export function getSysInfo(params) {
    return request({
        url: '/tes/conclude/check/findLinkSysInfo',
        method: 'get',
        params
    })
}

//达成度更新
export function updateReach(params) {
    return request({
        url: "/tes/conclude/conclude/exeupdate",
        method: 'get',
        params
    })
}
